<template>
  <!-- 客户关怀-选择客户 -->
  <div class="Select_the_customer">
    <!-- 顶部导航 -->
    <van-nav-bar
      title="选择客户"
      left-arrow
      @click-left="$router.go(-1)"
      :border="false"
      fixed
      z-index="999"
    >
      <template #right>
        <van-icon name="wap-home-o" size="25" @click="$router.push('/home')" />
      </template>
    </van-nav-bar>
    <!-- 搜索 -->
    <van-search
      v-model="Value"
      action-text="搜索"
      shape="round"
      show-action
      placeholder="关键字查询"
    />

    <!-- 客户 -->
    <div class="client">
      <van-cell
        :title="e.custName"
        :icon="picture"
        is-link
        center
        v-for="e in kehu"
        :key="e.id"
        @click="
          $router.push({
            path: '/newlyIncreasedCallOn',
            query: {
              id: JSON.stringify(e.id),
              custName: JSON.stringify(e.custName),
            },
          })
        "
      />
    </div>
  </div>
</template>

<script>
import { GetClientList } from "@/request/api";
export default {
  data() {
    return {
      Value: "",
      picture: require("../assets/头像男 拷贝 4.png"),

      // 客户
      kehu: [],
    };
  },
  created() {
    GetClientList({ keyword: "", current: 1, size: 10 }).then((res) => {
      this.kehu = res.data.records;
      // console.log(this.kehu);
    });
  },
};
</script>
 
<style lang = "less" scoped>
.Select_the_customer {
  padding-top: 0.46rem;
  /* 顶部导航 */
  .van-nav-bar {
    background-color: #003399;
  }
  /deep/.van-nav-bar__title,
  /deep/.van-icon {
    color: #ffffff;
  }

  /* 客户 */
  .client {
    margin-top: 0.15rem;
    .van-cell {
      height: 0.6rem;
      .van-icon {
        color: #969799;
      }
      .van-icon__image {
        width: 0.4rem;
        height: 0.4rem;
      }
      .van-cell__left-icon {
        height: 0.44rem;
        margin-right: 0.1rem;
      }
    }
  }
}
</style>